import get_menus from '@/utils/login/get_menus'
import $router from '@/router'

const get_menu = async () => {
  const menus = await get_menus()
  menus.map((menu: any) => {
    menu.twomenus.map((tem: any) => {
      $router.addRoute('layout', {
        path: tem.url,
        name: tem.name,
        component: () => import(tem.component)
      })
    })
  })
  console.log(menus, 'get_menu')
}
